package com.itheima.demo1;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newCachedThreadPool();

        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"执行");
        });

        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"执行");
        });

        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"执行");
        });
        executorService.shutdown();
    }
}
